function tax(gz){
    if(gz<=5000){
        return '不交税'
    }
    else
    {
        if(gz<=8000){
            return(gz-5000)*0.05
        }
        else{
            return(gz-8000)*0.1+(8000-5000)*0.05
        }
    }
}
console.log(tax(10000));